//
//  RouterVO.h
//  Base
//
//  Created by liuwei7 on 2017/8/16.
//  Copyright © 2017年 com.yhd. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NativeCallVO.h"
typedef NS_ENUM(NSUInteger, PBRouteObjectCreateType) {
    PBRouteObjectCreateByCode = 0,//编码方式创建，默认
    PBRouteObjectCreateByXib = 1//xib方式创建
};

typedef NS_ENUM(NSUInteger, PBRoutePlatformType) {
    PBRoutePlatformTypePhone = 0,//只支持iPhone
    PBRoutePlatformTypePad = 1,//只支持iPad
    PBRoutePlatformTypeUniversal = 2,//任何平台都支持，默认
};

@class JumpVO;

@protocol VirtualPage <NSObject>

@required
- (void)doVirtualRouteWithParams:(NSDictionary *)params;
@optional
- (JumpVO *)jumpVOWithParams:(NSDictionary *)params;

@end

@interface RouterVO : NativeCallVO

@property (nonatomic, copy) NSString *className;//创建的类名

@property (assign, nonatomic) PBRouteObjectCreateType createdType;//创建的方式

@property (assign, nonatomic) PBRoutePlatformType platformType;//支持的 platform

@property (assign, nonatomic) BOOL needLogin;//跳转当前页面是否需要登录

@property (assign, nonatomic) BOOL isVirtual;//默认为NO

@property (nonatomic, assign, getter=isTab) BOOL tab;//当前页面是否是 TabBar item 页面

@property (nonatomic, assign) NSUInteger index;//如果是 TabBar item 页面 当前页面 所在的 TabBar item index

/*
 ** 页面切换时是否做动画，默认为 YES
 ** 也可以从URL的qury string中传入，或 router 的 params 参数传入，这两种方式会覆盖VO中的值
 ** @sample
 ** [[Router sharedInstance] routeWithKey:@"sample" params:@{@"isAnimated":@(NO)}];
 ** 或
 ** [[Router sharedInstance] routeWithURLString:@"hw://sample?isAnimated=0"];
*/
@property (nonatomic, getter=isAnimated, assign) NSInteger animated;

- (UIViewController *)generateVCWithExtraData:(NSDictionary *)extraData;

@end
